const express = require('express')
var Sqlite = require('../db/sqlite3.js').SqliteDB;
console.log("进来了3")

const router = express.Router()

router.post('/add', (req, res) => {

    const { username, password } = req.body
    console.log(username, password)


    async function find() {

        const db = Sqlite.getInstance();
        const response = await db.addOne(`insert into account(login_name,pasword) values('${that1.user}','${that1.password}');`)
        if (response == 200) {
           console.log('成功')
        } else {
            console.log('失败')
        }
    }
    find()


})

module.exports = router